package org.crown.project.api.module.demo.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import org.crown.project.api.BaseApiEntity;

import lombok.*;
import lombok.experimental.SuperBuilder;
import lombok.experimental.Accessors;

/**
 * <p>
 * 票子
 * </p>
 *
 * @author WuFengSheng
 * @since 2020-03-09
 */
@Data
@ToString(callSuper = true)
@Builder
// 无参构造方法
@NoArgsConstructor
// 全参构造方法
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = false)
@TableName(value = "demo", keepGlobalPrefix = false)
public class Demo extends BaseApiEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String name;

    private Integer age;

    private String nickname;

    private Date time;

    private String phone;

    @TableField("create_by")
    @JSONField(serialize = false)
    private Long createBy;

    @TableField("create_time")
    private Date createTime;

    @TableField("update_by")
    @JSONField(serialize = false)
    private Long updateBy;

    @TableField("update_time")
    private Date updateTime;

    /**
     * 删除标志（0代表存在 1代表删除）
     */
    @TableLogic
    @JSONField(serialize = false)
    private Boolean deleted;

    @Version
    @JSONField(serialize = false)
    private Integer version;

    @JSONField(serialize = false)
    private String remark;


}